package com.navi168.fwq21.settings;

import com.navi168.fwq21.R;
import com.navi168.fwq21.util.Constants;
import com.navi168.fwq21.util.Login;

import android.app.Activity;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class Settingindex extends Activity{
	private Button logout;
	

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		setContentView(R.layout.setting_m);
		findviews();
		lisentners();
		
	}


	private void lisentners() {
		logout.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View v) {
				
				SharedPreferences settings = getSharedPreferences(
						Constants.SPF, 0);
				SharedPreferences.Editor editor = settings.edit();
				editor.putBoolean("islogin", false);
				editor.commit();
				Intent intent = new Intent(Settingindex.this,Login.class);
				startActivity(intent);
				
			}
		});
		
	}


	private void findviews() {
		logout = (Button) findViewById(R.id.logout);
		
	}
	
	
	

}
